package com.gyt.manager.controller.risk;

import com.gyt.manager.common.base.BaseController;
import com.gyt.manager.common.base.response.Page;
import com.gyt.manager.common.base.response.Response;
import com.gyt.manager.domain.req.TaskFlowReq;
import com.gyt.manager.domain.risk.FaultTaskInfo;
import com.gyt.manager.service.FaultTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * description.
 *
 * @author gyt create on 2021/6/10 10:48
 */
@RestController
@RequestMapping("resource")
@Api(value = "faultTask api controller",
        description = "资源运维管理-任务流接口", tags = {"faultTask"})
@Validated
public class FaultTaskController extends BaseController {

    @Autowired
    private FaultTaskService faultTaskService;

    @PostMapping("findTaskFlowInfos.do")
    @ApiOperation(value = "获取标签列表信息", notes = "标签")
    public Response<Page<FaultTaskInfo>> findTaskFlowInfos(
            @ApiParam(value = "请求对象")
            @RequestBody TaskFlowReq req) {
        Page<FaultTaskInfo> results =
                faultTaskService.findTaskFlowInfos(req);
        return Response.ok(results);
    }
}
